package day08.Test2;

import java.util.Objects;

public class Student {
    int id;
    String name;
    String gender;
    int age;

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return id == student.id &&
                age == student.age &&
                name.equals(student.name) &&
                gender.equals(student.gender);
    }


}
